home *** CD-ROM | disk | FTP | other *** search
- Path: cs.stir.ac.uk!gjn
- From: gjn@cs.stir.ac.uk (Gary J Nugent (MSc/SE))
- Newsgroups: comp.lang.c++
- Subject: DLL Creation Problem with VC++2.0
- Date: 7 Mar 1996 10:17:17 GMT
- Organization: Computing Science and Mathematics, Stirling University
- Distribution: world
- Message-ID: <4hmd3d$pt4@lorne.stir.ac.uk>
- NNTP-Posting-Host: gjn@shilling.cs.stir.ac.uk
-
- Hello
-
- I have a problem getting a DLL to compile and link from the command line with
- VC++2.0.
-
- I'm actually tring to create a simple DLL which I can call from a Java
- application. This is a test DLL which will just print a string. The Java code
- is OK and there are two C files. One created by Java as a stub file HelloWorld.c,
- and the other created in VC++2.0 HelloWorldImp.c as follows :-
-
-
- #include <StubPreamble.h>
- #include <stdio.h>
- #include "HelloWorld.h"
-
- void HelloWorld_displayHelloWorld(struct HHelloWorld *this) {
- printf("Hello World!\n");
- return;
- }
-
- I'm running Win NT 3.51, here are the relevant settings :-
-
- INCLUDE=e:\java\include;e:\java\include\win32;e:\msvc20\include;
- LIB=e:\msvc20\lib;e:\java\lib;%LIB%
-
-
- I then issue the following command for cl :-
-
- cl HelloWorld.c HelloWorldImp.c -FeHello.dll -MD -LD javai.lib
-
-
- Both source files are in the current directory and it finds the relevant headers
- associated with them and starts to compile HelloWorld.c. It then starts printing
- a multitude of identical errors related to several .h files. Two that I saw were
- objbase.h and ole2.h, and it complains that _export is an obsolete keyword over
- and over again. It does the same thing when it gets to HelloWorldImp.c.
-
-
- Is there some VC environment variable not set correctly, as I don't think it's a
- problem with the source files.
-
- Any ideas or help would be greatly appreciated
-
-
- Please respond by e-mail
-
- Cheers
-
- Gary Nugent
-
- gjn@cs.stir.ac.uk
- http://pc19.cs.stir.ac.uk/gjn.html
-
-
-
-